package com.clarkware.junitperf;

import java.util.ArrayList;

import VO.PoliticaVO;
import conexion.ManejadorPoliticas;
import junit.framework.Test;
import junit.framework.TestSuite;

/**
 * The <code>ExampleTimedTest</code> demonstrates how to decorate a
 * <code>Test</code> as a <code>TimedTest</code>.
 * 
 * @author <b>Mike Clark</b>
 * @author Clarkware Consulting, Inc.
 * 
 * @see com.clarkware.junitperf.TimedTest
 */

public class ExampleTimedTest {

	public static final long toleranceInMillis = 100;

	/*public static Test suiteRND1() {

		int users = 5;
		Timer timer = new ConstantTimer(500);
		Test testCase = new ExampleTestCase("testRND1");
		Test loadTest = new LoadTest(testCase, users, timer);

		return loadTest;
	}*/

	/*public static Test suiteRND2() {

		int users = 10;
		int iterations = 20;
		Timer timer = new ConstantTimer(50);
		Test testCase = new ExampleTestCase("testRND2");
		Test loadTest = new LoadTest(testCase, users, iterations, timer);

		return loadTest;
	}*/
	
	public static Test suitestEventoHumo() throws Exception {
		
		ArrayList<PoliticaVO> lPoliticas = new ManejadorPoliticas().obtenerPoliticas();
		ArrayList<Long> politicas = new ArrayList<Long>();

		int users = 3;
		int iterations = 3;
		Timer timer = new ConstantTimer(1);
		Test testCase = new ExampleTestCase("testEventoHumo",lPoliticas,politicas);
		Test loadTest = new LoadTest(testCase, users, iterations, timer);

		return loadTest;
	}
	
	/*public static Test suiteTestEvento() {

		int users = 5;
		int iterations = 5;
		Timer timer = new ConstantTimer(50);
		Test testCase = new ExampleTestCase("testRND2");
		Test loadTest = new LoadTest(testCase, users, iterations, timer);

		return loadTest;
	}*/

	/*public static Test suite() {

		TestSuite suite = new TestSuite();
		suite.addTest(suiteRND2());
		suite.addTest(suiteRND1());

		return suite;
	}*/
	

	public static void main(String args[]) throws Exception {
		// junit.textui.TestRunner.run(suiteRND1());
		// junit.textui.TestRunner.run(suiteRND2());
		//junit.textui.TestRunner.run(suite());
		
		junit.textui.TestRunner.run(suitestEventoHumo());
	}
}
